<template name="layout">
    <div class="container">
        {{> header}}
        {{> errors}}
        <div id="main" class="row-fluid">
            {{> yield}}
        </div>
    </div>

    <div class="backtotop">
        <a href="javascript:;" class="btn-backtotop" style="">
            <img src="/uptoTop.png" width="60px" height="60px">
        </a>
    </div>

    {{> footer}}
</template>

<template name="header">
    <nav class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="{{pathFor 'postsList'}}">ShareLinks</a>
            </div>
            <div class="collapse navbar-collapse" id="navigation">
                <ul class="nav navbar-nav">
                    {{#if currentUser}}
                        <li><a class="nav-addLink" href="{{pathFor 'postSubmit'}}">我要分享链接</a></li>

                        <li><a class="nav-addLink" href="/my/starPosts/all">我的收藏</a></li>
                    {{/if}}

                    <li class="dropdown">
                        {{> notifications}}
                    </li>

                    <li class="dropdown">
                        {{> category}}
                    </li>

                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            更多
                            <b class="caret"></b>
                        </a>
                        <ul class="notification dropdown-menu">
                            <li>
                                <a style="cursor: pointer;" href="/feedback">
                                    反馈
                                </a>
                            </li>
                            <li>
                                <a style="cursor: pointer;" href="/about">
                                    关于
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <div class="navbar-form navbar-left">
                            <div class="form-group">
                                <input id="searchInput" type="text" class="form-control" placeholder="Search">
                            </div>
                        </div>
                    </li>
                    {{> loginButtons}}
                </ul>
            </div>
        </div>
    </nav>
</template>

<template name="footer">
    <footer class="footer">
        © 2017
        <a href="http://blog.reeveslee.com:50">ShareLinks</a>.
        使用<a href="https://www.meteor.com/">Meteor</a>框架
        <a href="http://www.miitbeian.gov.cn/" rel="nofollow" target="_blank">皖ICP备16018709号-1</a>

        <script language="javascript" type="text/javascript" src="http://js.users.51.la/19119112.js"></script>
        <a href="http://www.51.la/?19119112" target="_blank"><img
                alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/19119112.asp"
                style="border:none"/></a>
    </footer>
</template>